package cn.caplike.demo.spring.factorybean;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author LiKe
 * @version 1.0.0
 * @date 2020-04-01 12:58
 */
public class CarFactoryBean implements FactoryBean<Car> {
    @Override
    public Car getObject() throws Exception {
        Car car = new Car();
        car.setBrand("A brand that no one knows.");
        return car;
    }

    @Override
    public Class<?> getObjectType() {
        return Car.class;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
